<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Title of website</title>

<link rel="stylesheet" href="<?php echo base_url('/assets/css/reset.css')?>">
<link rel="stylesheet" href="<?php echo base_url('assets');?>/css/style.css">
<link rel="stylesheet" href="<?php echo base_url('assets');?>/js/jquery.wysiwyg.css" type="text/css" />
<script src="<?php echo base_url('assets');?>/js/jquery.1.7.2.min.js" type="text/javascript"></script>
<script src="<?php echo base_url('assets');?>/js/jquery.wysiwyg.js" type="text/javascript"></script>
<script src="<?php echo base_url('assets');?>/js/jquery.site.js" type="text/javascript"></script>

</head>

<body>

	<div id="header" class="">
		<div id="" class="wrapper">
			<div id="" class="logo">
			
			</div><!-- / LOGO-->

			<div id="" class="search">
				<form action="#" method="get" accept-charset="utf-8">
					<input type="text" name="" value="" placeholder="Tu khoa tim kiem">
					<input type="submit" class="iSearch" name="" value="">
				</form>	
			</div><!-- / SEARCH-->

			<div id="" class="subNav">
				<ul id="" class="">
					<li><a href="" title="">Trang chủ</a></li>
					<li><a href="" title="">Tài khoản</a></li>
					<li><a href="" title="">Hỗ trợ</a></li>
				</ul><!-- / -->
			</div><!-- / SUB NAV-->

		</div><!-- / WRAPPER-->
	</div><!-- / HEADER -->

	<div id="" class="wrapper">
		<div id="leftContent" class="floatLeft">
			<div id="" class="box">
				<h1 id="sht" class="ansq">câu hỏi của bạn <a href="#" title="" class="floatRight">Ẩn/Hiện</a></h1>
				<?php if($this->session->userdata('user') == null): ?>
				<p class="notLogin">Bạn chưa <?php echo anchor('user/login', 'đăng nhập', 'title="Đăng Nhập"');?></p>
				<?php else:?>
				<?php
					$lstQuestion = $this->Post_model->getPostByUser($this->session->userdata('user'));
					 
				?>
				<ul id="listOfQ" class="number">
				<?php foreach ($lstQuestion AS $post):?>
					<li><a href="" title=""><?php echo $this->utility->shorter($post->post_title,40)?></a></li>
				<?php endforeach;?>
				</ul><!-- / LIST QUESTION-->
				<?php endif;?>
			</div><!-- / BOX-->
		</div><!-- / LEFT CONTENT-->

		<div id="rightContent" class="floatRight fullFixs">
			<div id="" class="quickPost">
				<ul id="" class="">
					<li class="quickMenu"><a href="" title="">Quick menu</a></li>
					<li class="addNews"><a href="" title="">Đăng câu hỏi</a></li>
				</ul><!-- / -->
				<ul id="" class="menuLeft">
					
					<?php foreach ($this->Category_model->getCategories() as $cat):?>
					<li>
						<?php echo img('assets/images/'.$cat->category_image)?>
						<?php echo anchor('#',$cat->category_name,array('title' => $cat->category_name))?>
						<?php
							$lstChildCat =  $this->Category_model->getCategories($cat->ID);
							if(count($lstChildCat)):
						?>
						<div id="" class="subMenuFirst">
							<ul id="" class="">
							<?php foreach ($lstChildCat as $childCat):?>
								<li><?php echo anchor('#',$childCat->category_name,array('title' => $childCat->category_name))?></li>
							<?php endforeach;?>	
							</ul><!-- / -->
						</div><!-- / Sub menu-->
						<?php endif;?>
					</li>
					<?php endforeach;?>
				</ul><!-- / UL MENU-->
				<div class="clear"></div>
			</div><!-- / QUICK POST-->
		</div><!-- / -->
		<?php $user = $this->User_model->getUserById($this->session->userdata('user'));?>
		<div id="AddContent" class="floatLeft fullFix">
		
			<div id="" class="box">
				<h1 class="blue">gửi câu hỏi</h1>

				<div id="" class="addEditor">
				<?php echo form_open('post');?>
				
					<div id="" class="floatLeft">
						<h1>thong tin chung</h1>
						<p>
							<label for="">Tieu de</label>
							<input type="text" name="tieude" value="<?php echo set_value('tieude')?>" placeholder="">
						</p>

						<p>
							<label for="">Chuyên mục</label>
							<?php $categories = $this->Category_model->getCategories()?>
							<select id="parentCat" name="parentCat">
								<option value="">Lựa chọn chuyên mục</option>
								<?php foreach ($categories as $cat):?>
								<option value="<?php echo $cat->ID?>"><?php echo $cat->category_name?></option>
								<?php endforeach;?>
							</select>
						</p>

						<p>
							<label for="">Mục con</label>
							<select id="childCat" name="childCat">
								<option value="" selected>Chọn mục con</option>
							</select>
						</p>

						<p>
							<label for="">Ma kiem tra</label>
							<input type="text" name="captcha" class="captchaText" value="" placeholder="">
							<input type="text" name="captchaconf" class="captcha" placeholder="">
						</p>
						
					</div><!-- / FLOAT LEFT-->
					<div id="" class="floatRight">
						<h1>thong tin ca nhan</h1>
						<p>
							<label for="">Nguoi dang</label>
							<input type="text" name="" value="<?php echo $user->user_name?>" placeholder="">
						</p>

						<p>
							<label for="">Dia chi</label>
							<input type="text" name="" value="<?php echo $user->user_address?>" placeholder="">
						</p>

						<p>
							<label for="">Email</label>
							<input type="text" name="" value="<?php echo $user->user_email?>" placeholder="">
						</p>

						<p>
							<label for="">Dien thoai</label>
							<input type="text" name="" value="<?php echo $user->user_phone?>" placeholder="">
						</p>

						<p>
							<label for="">Nick yahoo</label>
							<input type="text" name="" value="" placeholder="">
						</p>

					</div><!-- / FLOAT RIGHT-->

					<textarea id="editor" name="editor"></textarea>
					<input type="submit" name="" class="submit" value="Đăng câu hỏi">
					<div class="clear"></div>
				<?php echo form_close();?>
				</div><!-- / ADD EDITOR-->

			</div><!-- / BOX-->

		</div><!-- / CENTER CONTENT-->
		
		<div id="" class="clear"></div><!-- / -->
	</div><!-- / -->

	<div id="footer" class="wrapper">
		<h1 class="floatLeft">Website &copy 2012</h1>
		<h2 class="floatLeft"><a href="" title="">Gioi thieu</a> - <a href="" title="">Ho tro</a></h2>
	</div><!-- / FOOTER-->


</body>
</html>